import { handlerGetUrlParams } from '@/utils/dealUrlParams.js'
import request from '@/utils/request'

export function getContentPolicyList(param,data) {
  const url = handlerGetUrlParams('/policyCms/policyCms/list', param)
  return request({
    url,
    method: 'GET',
    data
  })
}

export function getFrontContentPolicyList(param,data) {
  const url = handlerGetUrlParams('/policyCms/policyCms/listFromFront', param)
  return request({
    url,
    method: 'GET',
    data
  })
}

export function editContentPolicyStatus(data) {
  return request({
    url: `/policyCms/policyCms`,
    method: 'PUT',
    data
  })
}

export function deleteContentPolicy(ids) {
  return request({
    url: `/policyCms/policyCms/${ids}`,
    method: 'DELETE',
  })
}

export function getContentPolicyDetail(ids) {
  return request({
    url: `/policyCms/policyCms/${ids}`,
    method: 'GET',
  })
}

export function getFrontContentPolicyDetail(ids) {
  return request({
    url: `/policyCms/policyCms/fromFront/${ids}`,
    method: 'GET',
  })
}

export function editContentPolicy(data) {
  return request({
    url: `/policyCms/policyCms`,
    method: 'PUT',
    data
  })
}

export function issueContentPolicy(data) {
  return request({
    url: `/policyCms/policyCms`,
    method: 'POST',
    data
  })
}

export function hotReadList(data) {
  return request({
    url: `/policyCms/policyCms/selectHot`,
    method: 'GET',
    data
  })
}